package 题目集.数学;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class 进制 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int p = (int) (Math.log(n) / Math.log(26))-1;
        int base = (int) Math.pow(26, p);
        List<Character> list = new LinkedList<>();
        while (n > 26) {
            list.add((char) ('A' + n / base-1));
            n =n%base;
            if (n%base == 0) {
                n = n/26;
            }else {
                n = n%base;
            }
            base /= 26;
        }
        list.add((char) ('A' + n-1));
        list.forEach(System.out::print);
    }
}
